#!/bin/bash
set -e

find /etc/nginx -name 'default.conf' | xargs sed -i "s V_SERVER_NAME $SERVER_NAME g"
find /usr/share/nginx/html -name '*.js' | xargs sed -i "s https://filedev.quanyou.com.cn $VUE_APP_IMG_PREFIX g"
find /usr/share/nginx/html -name '*.js' | xargs sed -i "s https://filedev.quanyou.com.cn $VUE_APP_PIC_PREFIX g"
find /usr/share/nginx/html -name '*.js' | xargs sed -i "s https://uacdev.quanyou.com.cn/slm/bmp_img $VUE_APP_BPMPIC_PREFIX g"
cat /etc/nginx/conf.d/default.conf

exec "$@"